package com.yowasa.xiuxian.engine.message.help;

import com.yowasa.xiuxian.annoations.CMD;
import com.yowasa.xiuxian.engine.message.CmdMessageHandler;
import com.yowasa.xiuxian.entity.enums.CmdScopeEnum;
import com.yowasa.xiuxian.entity.mys.MysComponent;
import com.yowasa.xiuxian.entity.mys.SendMessage;
import com.yowasa.xiuxian.service.helper.MessageHelper;
import com.yowasa.xiuxian.util.ComponentUtil;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 获取描述
 */
@CMD(name = "/修炼", scope = CmdScopeEnum.ALL,outCmd = true)
public class ExpHelpHandler extends CmdMessageHandler {
    @Autowired
    private MessageHelper messageHelper;

    @Override
    public void execute(SendMessage message) {
        MysComponent component = new MysComponent("1",2,"开始修炼","/开始修炼");
        MysComponent componentA = new MysComponent("2",2,"结束修炼","/结束修炼");
        MysComponent componentB = new MysComponent("3",2,"突破","/突破");

        List<List<MysComponent>> lists = ComponentUtil.genComponentList(2, component, componentA, componentB);

        messageHelper.replyMysPanel(message, "请选择要进行的操作",null,lists,null);
    }

    public String desc(){
        return new StringBuffer().append("商店！！！\n")
                .toString();

    }
}
